﻿using Furion.DatabaseAccessor;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Mrhd.Core.Entities
{
    /// <summary>
    /// 商户
    /// </summary>
    [Table("Sys_Business")]
    [Comment("商户")]
    public class BusinessEntity : Entity
    {
        /// <summary>
        /// 商户名称
        /// </summary>
        [Comment("商户名称")]
        [MaxLength(64)]
        public string Title { get; set; }
        /// <summary>
        /// 经营范围
        /// </summary>
        [Comment("经营范围")]
        [MaxLength(512)]
        public string Description { get; set; }
        /// <summary>
        /// 图片地址使用 | 分隔
        /// </summary>
        [Comment("图片地址使用 | 分隔")]
        [MaxLength(4098)]
        public string ImageUrls { get; set; }
        /// <summary>
        /// 发票抬头
        /// </summary>
        [Comment("发票抬头")]
        [MaxLength(64)]
        public string TaxTitle { get; set; }
        /// <summary>
        /// 税号
        /// </summary>
        [Comment("税号")]
        [MaxLength(64)]
        public string TaxNumber { get; set; }
        /// <summary>
        /// 企业类型
        /// </summary>
        [Comment("企业类型")]
        public CompanyType Type { get; set; }
        /// <summary>
        /// 省份
        /// </summary>
        [Comment("省份")]
        [MaxLength(32)]
        public string Province { get; set; }
        /// <summary>
        /// 城市
        /// </summary>
        [Comment("城市")]
        [MaxLength(32)]
        public string City { get; set; }
        /// <summary>
        /// 注册地址
        /// </summary>
        [Comment("注册地址")]
        [MaxLength(512)]
        public string Address { get; set; }
        /// <summary>
        /// 纬度
        /// </summary>
        [Comment("纬度")]
        public double Lat { get; set; }
        /// <summary>
        /// 经度
        /// </summary>
        [Comment("经度")]
        public double Lng { get; set; }
        /// <summary>
        /// 绑定商户时，推荐员工编码
        /// </summary>
        [Comment("绑定商户时，推荐员工编码")]
        [MaxLength(32)]
        public string UserCode { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        [Comment("审核时间")]
        public DateTimeOffset? ApprovalTime { get; set; }
        /// <summary>
        /// 审核人id
        /// </summary>
        [Comment("审核人id")]
        public int? ApprovalUserId { get; set; }
        /// <summary>
        /// 商户管理员id
        /// </summary>
        [Comment("商户管理员id")]
        public int? ManagerId { get; set; }
        /// <summary>
        /// 绑定关系
        /// </summary>
        [Comment("绑定关系")]
        public virtual ICollection<UserMobileToBusinessEntity> WxUsers { get; set; }
    }

}
